package(default_visibility=["//visibility:public"])
load("@angular//:index.bzl", "ng_module")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")


ng_module(
  name = "portal",
  srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
  module_name = "@angular/cdk/portal",
  deps = ["@rxjs"],
  tsconfig = "//src/cdk:tsconfig-build.json",
)

ts_library(
  name = "portal_test_sources",
  testonly = 1,
  srcs = glob(["**/*.spec.ts"]),
  deps = [
    ":portal",
    "@rxjs",
  ],
  tsconfig = "//src/cdk:tsconfig-build.json",
)

ts_web_test(
  name = "unit_tests",
  bootstrap = ["//:web_test_bootstrap_scripts"],
  tags = ["manual"],
  # Do not sort
  deps = [
    "//:tslib_bundle",
    "//:angular_bundles",
    "//:angular_test_bundles",
    "//test:angular_test_init",
    ":portal_test_sources",
  ],
)
